Skip to content

Conversation

@ShivangSingh68
Copy link

Fixes #3560

This PR fixes a startup crash that occurs on systems without a Vulkan-capable GPU.

Previously, Graphite would select a CPU-based Vulkan adapter (such as llvmpipe) and continue initialization. This would later trigger a wgpu validation error, followed by a panic and segmentation fault, making it difficult for users to understand that their system does not meet the graphics requirements.

Summary of changes

  • Detect and reject CPU-based Vulkan adapters during context initialization.

  • Fail early when no supported GPU adapter is available, instead of continuing into an invalid wgpu state.

  • Preserve existing adapter-selection logic while adding a clear support check to prevent crashes.

Impact

  • Prevents crashes and undefined behavior on unsupported systems.

  • Makes Graphite’s GPU requirements clearer to users.

  • Improves robustness and error handling during graphics initialization.

Testing

  • Confirmed normal startup on systems with a supported GPU.

  • Confirmed graceful failure (no panic or segmentation fault) when only CPU Vulkan adapters are present.

  • Verified with cargo check and cargo clippy --all-targets --all-features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash on startup when only llvmpipe (CPU Vulkan) is available instead of graceful error

1 participant